import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path:'/',
      component:()=>import('@/views/Authority_Center/Login.vue')
    },
    {
      path:'/menu',
      component:()=>import('@/views/Menu.vue'),
      children:
      [
        {
          path:'/userlist',
          component:()=>import('@/views/Authority_Center/userrolemenu/UserList.vue')
        },
        {
          path:'/rolelist',
          component:()=>import('@/views/Authority_Center/userrolemenu/RoleList.vue')
        },
        {
          path:'/menulist',
          component:()=>import('@/views/Authority_Center/userrolemenu/MenuLIst.vue')
        },
        {
          path:'/rolemenulist',
          component:()=>import('@/views/Authority_Center/userrolemenu/Rolemenulist.vue')
        },
        {
          path:'/leaveApplication',
          component:()=>import('@/views/Authority_Center/leave/LeaveApplication.vue')
        },
        {
          path: '/leavereport',
          component: () => import('@/views/Authority_Center/leave/LeaveReportForms.vue')
        },
        {
          path: '/batchmanagement',
          component: () => import('@/views/Traceability/BatchManagement.vue')
        },
        {
          path: '/batch-detail',
          component: () => import('@/views/Traceability/BatchDetail.vue')
        }
      ]
    }
  ]
})

export default router
